#!usr/bin/env python  
#@time: 2018/01/19 
import json
d = dict(name="Bob", age=20, score=88)
res = json.dumps(d)
print(res)

f = open('./demo.json','a')
f.write(res)

#  读取
res = json.loads(res)
print(res)